package com.cswangdao.mapper;

import com.cswangdao.domain.po.MarketSystem;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Service;

import java.util.List;

@Mapper
public interface MarketSystemMapper {
    /**
     * @description: 获取商场配置信息
     * @param: null
     * @return: List<MarketSystem>
     */
  //  List<MarketSystem> getMarketMall();

    /**
     * @description: 根据前缀删除商场配置信息
     * @param: marketMall
     * @return: void
     */
    void deleteByPrefix(String prefix);

    /**
     * @description: 批量插入商场配置信息
     * @param: list
     * @return: void
     */
    void insertBatch(List<MarketSystem> list);

    List<MarketSystem> getByPrefix(String prefix);

    @Select("select key_value from market_system where key_name = #{name}")
    Integer getValueByName(String name);

    @Select("select key_value from market_system where key_name = #{name}")
    String getValueIsStringByName(String name);
}